package com.zhiyou.service.impl;

import com.zhiyou.bean.Type;
import com.zhiyou.dao.TypeMapper;
import com.zhiyou.service.TypeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class TypeServiceImpl implements TypeService {

    @Resource
    TypeMapper typeMapper;

    @Override
    public List<Type> getAllTypes() {
        return typeMapper.selectAll();
    }

    @Override
    public Type getTypeById(Integer typeId) {
        return typeMapper.selectByPrimaryKey(typeId);
    }
}
